#ifndef WRITER_H
#define WRITER_H

#include <QObject>
#include <QRunnable>
#include <QVector>

#include "shell.h"

class Writer : public QObject, public QRunnable
{
    Q_OBJECT

    QVector<size_t> m_books;
    Shell *m_shell;
    volatile int m_timeout;

public:
    explicit Writer(Shell *shell, int timeout, QObject *parent = 0);

    void run();

public slots:
    void set_timeout(int timeout);
    
signals:
    void i_m_waiting();
    void i_m_editing();
};

#endif // WRITER_H
